livepatch: Wrong usage of spinlock on debug console.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 9 Jun 2017 13:31:28 +0000 (09:31 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 12 Jun 2017 12:59:33 +0000 (08:59 -0400)
commit75dfe7c566c36e0af4714557a666827f49b69191
treec89ae9a70ef293cfb87c373ed0bc2e8e7cc34de4
parent136d46e548db1c346c3e14b8d6d5b771fc30ca41
livepatch: Wrong usage of spinlock on debug console.

If we have a large amount of livepatches and want to print them
on the console using 'xl debug-keys x' we eventually hit
the preemption check:

  if ( i && !(i % 64) )
  {
spin_unlock(&payload_lock);
process_pending_softirqs();
if ( spin_trylock(&payload_lock) )
return

<facepalm> The effect is that we have just effectively
taken the lock and returned without unlocking!

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-and-tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/common/livepatch.c